﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using JihankiLib;

namespace GuiJihanki
{
    public partial class ItemResultDialog : Form
    {
        public ItemResultDialog()
        {
            InitializeComponent();
        }

        public ItemResultDialog(string msg)
            : this()
        {
            lblMsg.Text = msg;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            Close();
        }
    }

    public class MessageDialogResult : IJihankiResult
    {
        private ItemResultDialog dialog;

        internal MessageDialogResult(string msg)
        {
            this.dialog = new ItemResultDialog(msg);
        }

        public void OpenResult()
        {
            dialog.StartPosition = FormStartPosition.CenterScreen;
            dialog.TopMost = true;
            dialog.ShowDialog();
        }
    }

}
